package com.ycp.erp.main.fragment;

import android.os.Bundle;

import com.one.common.view.pagestate.listpage.BaseListFragment;
import com.ycp.erp.main.binder.EnterWarehouseRecordBinder;
import com.ycp.erp.main.model.bean.WarehouseRecord;

import java.util.ArrayList;

/**
 * Class Des:
 * Created by bjh on 2021/9/2.
 */
public class EnterWarehouseRecordFragment extends BaseListFragment {
    @Override
    protected void initPresenter() {

    }

    @Override
    public void registerDate() {
           register(WarehouseRecord.class,new EnterWarehouseRecordBinder());
    }

    @Override
    public void initData() {
        super.initData();
        loadData();
    }

    @Override
    public void loadData() {
        ArrayList<WarehouseRecord> warehouseRecords=new ArrayList<>();
        warehouseRecords.add(new WarehouseRecord());
        warehouseRecords.add(new WarehouseRecord());
        warehouseRecords.add(new WarehouseRecord());
        warehouseRecords.add(new WarehouseRecord());
        warehouseRecords.add(new WarehouseRecord());
        warehouseRecords.add(new WarehouseRecord());
        warehouseRecords.add(new WarehouseRecord());
        getAdapter().setItems(warehouseRecords);
        getAdapter().notifyDataSetChanged();
    }
    /**
     * 获取一个任务列表的实例
     */
    public static EnterWarehouseRecordFragment getInstance(String taskState) {
        EnterWarehouseRecordFragment fragment = new EnterWarehouseRecordFragment();
        Bundle bundle = new Bundle();
        bundle.putString("taskState", taskState);
        fragment.setArguments(bundle);
        return fragment;
    }
}
